package com.ruoyi.production.service.impl.graftinglabel;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.production.mapper.graftinglabel.GraftinglabelTypeMapper;
import com.ruoyi.production.domain.graftinglabel.GraftinglabelType;
import com.ruoyi.production.service.graftinglabel.IGraftinglabelTypeService;

/**
 * 嫁接签类型Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-12
 */
@Service
public class GraftinglabelTypeServiceImpl implements IGraftinglabelTypeService
{
    @Autowired
    private GraftinglabelTypeMapper graftinglabelTypeMapper;

    /**
     * 查询嫁接签类型
     *
     * @param graftinglabelTypeId 嫁接签类型ID
     * @return 嫁接签类型
     */
    @Override
    public GraftinglabelType selectGraftinglabelTypeById(Long graftinglabelTypeId)
    {
        return graftinglabelTypeMapper.selectGraftinglabelTypeById(graftinglabelTypeId);
    }

    /**
     * 查询嫁接签类型列表
     *
     * @param graftinglabelType 嫁接签类型
     * @return 嫁接签类型
     */
    @Override
    public List<GraftinglabelType> selectGraftinglabelTypeList(GraftinglabelType graftinglabelType)
    {
        return graftinglabelTypeMapper.selectGraftinglabelTypeList(graftinglabelType);
    }

    /**
     * 新增嫁接签类型
     *
     * @param graftinglabelType 嫁接签类型
     * @return 结果
     */
    @Override
    public int insertGraftinglabelType(GraftinglabelType graftinglabelType)
    {
        graftinglabelType.setCreateTime(DateUtils.getNowDate());
        return graftinglabelTypeMapper.insertGraftinglabelType(graftinglabelType);
    }

    /**
     * 修改嫁接签类型
     *
     * @param graftinglabelType 嫁接签类型
     * @return 结果
     */
    @Override
    public int updateGraftinglabelType(GraftinglabelType graftinglabelType)
    {
        graftinglabelType.setUpdateTime(DateUtils.getNowDate());
        return graftinglabelTypeMapper.updateGraftinglabelType(graftinglabelType);
    }

    /**
     * 批量删除嫁接签类型
     *
     * @param graftinglabelTypeIds 需要删除的嫁接签类型ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelTypeByIds(Long[] graftinglabelTypeIds)
    {
        return graftinglabelTypeMapper.deleteGraftinglabelTypeByIds(graftinglabelTypeIds);
    }

    /**
     * 删除嫁接签类型信息
     *
     * @param graftinglabelTypeId 嫁接签类型ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelTypeById(Long graftinglabelTypeId)
    {
        return graftinglabelTypeMapper.deleteGraftinglabelTypeById(graftinglabelTypeId);
    }
}
